home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / Button / Sources / Select.cpp < prev    next >
Encoding:
Text File  |  1996-12-16  |  3.7 KB  |  144 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Select.cpp
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Author:                M.Boetcher
  7. //
  8. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef SELECT_H
  13. #include "Select.h"
  14. #endif
  15.  
  16. #ifndef PART_H
  17. #include "Part.h"
  18. #endif
  19.  
  20. #ifndef BINDING_K
  21. #include "Binding.k"
  22. #endif
  23.  
  24. #ifndef ACTIONS_H
  25. #include "Actions.h"
  26. #endif
  27.  
  28. #ifndef CONTENT_H
  29. #include "Content.h"
  30. #endif
  31.  
  32. // ----- Framework Includes -----
  33.  
  34. #ifndef FWPRESEN_H
  35. #include "FWPresen.h"
  36. #endif
  37.  
  38. // ----- OS Layer -----
  39.  
  40. #ifndef FWBARRAY_H
  41. #include "FWBArray.h"
  42. #endif
  43.  
  44. #ifndef FWMEMMGR_H
  45. #include "FWMemMgr.h"
  46. #endif
  47.  
  48. // ----- OpenDoc Includes -----
  49.  
  50. #ifndef SOM_Module_OpenDoc_StdProps_defined
  51. #include <StdProps.xh>
  52. #endif
  53.  
  54. // ----- Macintosh Includes -----
  55.  
  56. #if defined(FW_BUILD_MAC) && !defined(__DRAG__)
  57. #include <Drag.h>
  58. #endif
  59.  
  60. //========================================================================================
  61. //    Runtime information
  62. //========================================================================================
  63.  
  64. #ifdef FW_BUILD_MAC
  65. #pragma segment odfbutton
  66. #endif
  67.  
  68. FW_DEFINE_AUTO(CButtonSelection)
  69.     
  70. //========================================================================================
  71. //    CLASS CButtonSelection
  72. //========================================================================================
  73.  
  74. //----------------------------------------------------------------------------------------
  75. //    CButtonSelection constructor
  76. //----------------------------------------------------------------------------------------
  77.  
  78. CButtonSelection::CButtonSelection(Environment* ev, CButtonContent* content) :
  79.     FW_CSelection(ev, FALSE, FALSE),
  80.     fSelectedContent(content)
  81. {
  82.     FW_END_CONSTRUCTOR
  83. }
  84.  
  85. //----------------------------------------------------------------------------------------
  86. //    CButtonSelection destructor
  87. //----------------------------------------------------------------------------------------
  88.  
  89. CButtonSelection::~CButtonSelection()
  90. {
  91.     FW_START_DESTRUCTOR
  92. }
  93.  
  94. //----------------------------------------------------------------------------------------
  95. //    CButtonSelection::CloseSelection
  96. //----------------------------------------------------------------------------------------
  97.  
  98. void CButtonSelection::CloseSelection(Environment* ev)
  99. {
  100. FW_UNUSED(ev);
  101.     // Nothing to do
  102. }
  103.  
  104. //----------------------------------------------------------------------------------------
  105. //    CButtonSelection::ClearSelection
  106. //----------------------------------------------------------------------------------------
  107.  
  108. void CButtonSelection::ClearSelection(Environment* ev)
  109. {
  110. FW_UNUSED(ev);
  111.     // Nothing to do
  112. }
  113.  
  114. //----------------------------------------------------------------------------------------
  115. //    CButtonSelection::IsEmpty
  116. //----------------------------------------------------------------------------------------
  117.  
  118. FW_Boolean CButtonSelection::IsEmpty(Environment* ev) const
  119. {
  120. FW_UNUSED(ev);
  121.     return fSelectedContent->GetAction() == NULL;
  122. }
  123.  
  124. //----------------------------------------------------------------------------------------
  125. //    CButtonSelection::SelectAll
  126. //----------------------------------------------------------------------------------------
  127.  
  128. void CButtonSelection::SelectAll(Environment* ev)
  129. {
  130. FW_UNUSED(ev);
  131.     // Nothing to do
  132. }
  133.  
  134. //----------------------------------------------------------------------------------------
  135. //    CButtonSelection::GetSelectedContent
  136. //----------------------------------------------------------------------------------------
  137.  
  138. FW_CContent* CButtonSelection::GetSelectedContent(Environment* ev)
  139. {
  140. FW_UNUSED(ev);
  141.     return fSelectedContent;
  142. }
  143.  
  144.